﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataCentral.BusinessDataObjects;
using System.Windows.Forms;


namespace DataCentral.UsecaseControllers
{ 
    public class LoginUsecase
    {
        public LoginForm _FrmLogin;
        public MainUsecase ucMain;
        public LoginUsecase()
        {
        }

        public void StartUsecase()
        {
            _FrmLogin = new LoginForm(this);
            
            _FrmLogin.ShowDialog();
            
        }

        public void ShowMainForm(UserBO userBO)
        {
            ucMain = new MainUsecase(this,userBO);
            ucMain.StartUsecase();
        }

        public void CloseMainForm(UserBO userBO, MainForm frmMain)
        {
            
        }



        public UserBO GetUserBO(string strUser, string strPassword)
        {
            UserBO userBO = new UserBO();
            return userBO.GetUserBOByUsename(strUser, strPassword);
        }
    }
}
